import * as constant from './constant.js'

export default {
	// 获取列表
	queryList (name) {
		return constant[name] || []
	},
	// 获取节点
	queryItem (value, name) {
		let list = this.queryList(name)
		let node = list.find(item => String(item.value) === String(value))
		return node
	},
	// 获取值
	queryText (value, name) {
		let node = this.queryItem(value, name) || {}
		return node.text || ''
	}
}
